<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:p="http://primefaces.org/ui"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:composite="http://java.sun.com/jsf/composite">

    <composite:interface>

        <composite:attribute name="enabledDisabled"/>
        <composite:attribute name="nameDisabled"/>
        <composite:attribute name="descriptionDisabled"/>
        <composite:attribute name="defaultOptionDisabled"/>
        <composite:attribute name="freightTransportDisabled"/> 

        <composite:attribute name="nameRequired"/> 

        <composite:attribute name="defaultOptionRendered"/>
        <composite:attribute name="defaultOptionSearchRendered"/>
        <composite:attribute name="freightTransportRendered"/> 
        <composite:attribute name="freightTransportSearchRendered"/>     

    </composite:interface>

    <h:panelGrid columns="3"
                 columnClasses="columnWidth48, columnWidth4, columnWidth48"
                 width="90%"
                 style="margin-left: auto; margin-right: auto">

        <h:panelGrid columns="1"
                     columnClasses="columnWidth100"
                     rowClasses="rowAlign"
                     width="100%">

            <p:outputLabel value="#{bundle.Name}" 
                           for="name"/>

            <p:inputText id="name" 
                         style="width: 100%; margin-bottom: 2%"
                         value="#{industryController.selected.name}"
                         tabindex="01"
                         disabled="#{cc.attrs.nameDisabled}"
                         required="#{cc.attrs.nameRequired}"/>  

            <p:outputLabel value="#{bundle.DefaultOption}" 
                           for="defaultOption"/>

            <p:selectBooleanCheckbox id="defaultOption"
                                     style="vertical-align: -22%"
                                     value="#{industryController.selected.defaultOption}"
                                     tabindex="03"
                                     disabled="#{cc.attrs.defaultOptionDisabled}"
                                     rendered="#{cc.attrs.defaultOptionRendered}"/>

            <p:selectOneMenu id="defaultOptionSearch"
                             style="width: 100%"
                             value="#{industryController.defaultOptionSearch}"
                             tabindex="03"
                             rendered="#{cc.attrs.defaultOptionSearchRendered}">

                <f:selectItem itemLabel="#{bundle.Both}" itemValue="b"/>
                <f:selectItem itemLabel="#{bundle.Yes}" itemValue="t"/>
                <f:selectItem itemLabel="#{bundle.No}" itemValue="f"/>

            </p:selectOneMenu>

        </h:panelGrid>

        <p:spacer/>

        <h:panelGrid columns="1"
                     columnClasses="columnWidth100"
                     rowClasses="rowAlign"
                     width="100%">  

            <p:outputLabel value="#{bundle.Description}" 
                           for="description"/>

            <p:inputText id="description" 
                         style="width: 100%; margin-bottom: 2%"
                         value="#{industryController.selected.description}"
                         tabindex="02"
                         disabled="#{cc.attrs.descriptionDisabled}"/>

            <p:outputLabel value="#{bundle.FreightTransport}" 
                           for="freightTransport"/>

            <p:selectBooleanCheckbox id="freightTransport"
                                     style="vertical-align: -22%"
                                     value="#{industryController.selected.freightTransport}"
                                     tabindex="04"
                                     disabled="#{cc.attrs.freightTransportDisabled}"
                                     rendered="#{cc.attrs.freightTransportRendered}"/> 

            <p:selectOneMenu id="freightTransportSearch"
                             style="width: 100%"
                             value="#{industryController.freightTransportSearch}"
                             tabindex="04"
                             rendered="#{cc.attrs.freightTransportSearchRendered}">

                <f:selectItem itemLabel="#{bundle.Both}" itemValue="b"/>
                <f:selectItem itemLabel="#{bundle.Yes}" itemValue="t"/>
                <f:selectItem itemLabel="#{bundle.No}" itemValue="f"/>

            </p:selectOneMenu>      

        </h:panelGrid> 

    </h:panelGrid>

    <p:dialog header="#{bundle.AdditionalInfo}"
              widgetVar="additionalInfoDialog" 
              resizable="false" 
              modal="true" 
              showEffect="fade"
              hideEffect="fade" 
              draggable="false"
              width="48%"
              style="margin-left: auto; margin-right: auto">

        <h:panelGrid columns="3"
                     columnClasses="columnWidth48, columnWidth4, columnWidth48"
                     width="90%"
                     style="margin-left: auto; margin-right: auto">

            <h:panelGrid columns="1"
                         columnClasses="columnWidth100"
                         rowClasses="rowAlign"
                         width="100%">

                <p:outputLabel value="#{bundle.Id}" 
                               for="id"/>

                <p:inputText id="id" 
                             style="width: 100%; margin-bottom: 2%"
                             value="#{industryController.selected.id}"
                             disabled="true"/>         

                <p:outputLabel value="#{bundle.CreatedBy}" 
                               for="createdBy"/>

                <p:inputText id="createdBy" 
                             style="width: 100%; margin-bottom: 2%"
                             value="#{industryController.selected.createdBy.name}"
                             disabled="true"/>

                <p:outputLabel value="#{bundle.UpdatedBy}" 
                               for="updatedBy"/>

                <p:inputText id="updatedBy"   
                             style="width: 100%"
                             value="#{industryController.selected.updatedBy.name}"
                             disabled="true"/>         

            </h:panelGrid>

            <p:spacer/>

            <h:panelGrid columns="1"
                         columnClasses="columnWidth100"
                         rowClasses="rowAlign"
                         width="100%">

                <p:outputLabel value="#{bundle.Enabled}" 
                               for="enabled"/>

                <p:selectBooleanCheckbox id="enabled"
                                         style="vertical-align: -22%; margin-bottom: 4%"
                                         value="#{industryController.selected.enabled}"
                                         disabled="#{cc.attrs.enabledDisabled}"/>          

                <p:outputLabel value="#{bundle.Created}" 
                               for="created"/>

                <p:inputText id="created"
                             style="width: 100%; margin-bottom: 2%"
                             value="#{industryController.selected.created}"
                             disabled="true">

                    <f:convertDateTime 
                        locale="#{localizationUtil.selected}" 
                        type="both"
                        pattern="#{localizationUtil.dateTimeFormatMediumPattern}" 
                        timeZone="#{localizationUtil.defaultTimeZone}"/>      

                </p:inputText>  

                <p:outputLabel value="#{bundle.Updated}" 
                               for="updated"/>

                <p:inputText id="updated"
                             style="width: 100%"
                             value="#{industryController.selected.updated}"
                             disabled="true">

                    <f:convertDateTime 
                        locale="#{localizationUtil.selected}" 
                        type="both"
                        pattern="#{localizationUtil.dateTimeFormatMediumPattern}" 
                        timeZone="#{localizationUtil.defaultTimeZone}"/>

                </p:inputText>         

            </h:panelGrid>    

        </h:panelGrid>

    </p:dialog>  

</html>